package com.youlai.boot.factory.model.form;

import java.io.Serial;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;
import java.util.List;

import jakarta.validation.constraints.*;

/**
 * 报工单表单对象
 *
 * @author youlaitech
 * @since 2025-10-13 13:30
 */
@Getter
@Setter
@Schema(description = "报工单表单对象")
@JsonIgnoreProperties(ignoreUnknown = true)
public class WorkReportForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID")
    private Long id;

    @Schema(description = "款ID")
    @NotNull(message = "款ID不能为空")
    private Long styleId;

    @Schema(description = "报工人ID")
    private Long workerId;

    @Schema(description = "选择的工序IDS（逗号分隔）")
    private String processIds;

    @Schema(description = "报工时间")
    private LocalDateTime reportDate;

    @Schema(description = "状态：1-正常 0-删除")
    private Integer status;

    @Schema(description = "创建人")
    @Size(max=50, message="创建人长度不能超过50个字符")
    private String createBy;

    @Schema(description = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "更新人")
    @Size(max=50, message="更新人长度不能超过50个字符")
    private String updateBy;

    @Schema(description = "更新时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @Schema(description = "裁床单ID")
    @NotNull(message = "裁床单ID不能为空")
    private Long cuttingBedId;


    @Schema(description = "报工工资")
    private BigDecimal reportSalary;

    @Schema(description = "报工总数量")
    private Integer totalQuantity;

    @Schema(description = "工序包关联列表")
    private List<ProcessPackageDTO> processPackageList;

    @Schema(description = "报工类型")
    private String reportType;

    @Schema(description = "审核状态 0-待审核 1-审核通过 2-审核拒绝")
    private String auditStatus;

    @Schema(description = "驳回原因")
    @Size(max = 500, message = "驳回原因长度不能超过500个字符")
    private String rejectReason;
}
